package org.book.service;

import java.util.List;

import org.book.dao.BookBean;
import org.book.dao.BookDao;
import org.book.dao.BookDaoImp;

public class BookService {
	BookDao dao = new BookDaoImp();
	public List<BookBean> getList(int pageCurrent, int pageSize) {
		return dao.getList(pageCurrent, pageSize);
	}
	
	public int getCount() {
		return dao.getCount();
	}
	
	public boolean add(BookBean stu) {
		return dao.add(stu);
	}
	
	public boolean remove(int no) {
		if(dao.isEmpty(no)) {
			
			return dao.remove(no);
		}
		return false;
	}
	
	public boolean update(int no,BookBean stu) {
		if(dao.isEmpty(no)) {
			
			return dao.update(no, stu);
		}
		return false;
	}
	
	
	public BookBean getStuByNo(int no) {
		if(dao.isEmpty(no)) {
			return dao.getStuByNo(no);
		}
		return null;
	}
	
	
	public List<BookBean> getLike(String str){
		return dao.getLike(str);
	}
}
